export const visitedMixin = {
  data () {
    return {
      visitersList: []
    }
  },
  created () {
    this.getVisitersList()
  },
  methods: {

    async hadLeft (_id, leaveTime) {
      const { data: res } = await this.$axios.get('/visit/visiterLeft', {
        params: {
          _id,
          leaveTime
        }
      })
      // console.log(res)
      if (res.meta.code === 200) {
        this.$message.success(res.meta.msg)
      } else {
        this.$message.error(res.meta.msg)
      }
      this.getVisitersList()
    }
  }
}
